#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include <limits.h>
int main()
{
	int arr[10] = { 0 };
	int i = 0;
	for (i = 0; i < 10; i++)
	{
		scanf("%d", &arr[i]);
	}
	int Max = arr[0];
	int Min = arr[0];
	for (i = 1; i < 10; i++)
	{
		if (arr[i] > Max)
			Max = arr[i];
		if (arr[i] < Min)
			Min = arr[i];
	}
	printf("%d\n", Max - Min);
	return 0;
}
